package jmu.edu.yjc.domain.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import jmu.edu.yjc.interfaces.AddGroup;
import jmu.edu.yjc.interfaces.UpdateGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author yjc
 * @date 2023/4/21 17:06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserRegisterDto {
    //用户名
    @ApiModelProperty(notes = "用户名")
    @NotBlank(message = "用户名不能为空,且不包含空格" ,groups = {AddGroup.class,UpdateGroup.class})
    private String userName;
    //昵称
    @ApiModelProperty(notes = "昵称")
    @NotNull(message = "昵称不能为空", groups = {AddGroup.class})
    private String nickName;
    //密码
    @ApiModelProperty(notes = "密码")
    @NotBlank(message = "密码不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private String password;

    //邮箱
    @ApiModelProperty(notes = "邮箱")
    @Email(groups = {AddGroup.class, UpdateGroup.class})
    private String email;
    @NotBlank(message = "验证码不能为空",groups = {AddGroup.class, UpdateGroup.class})
    private String code;
}
